import React from "react";
import { Button, notification } from "antd";
export const openNotification = ({
  msg = "新消息标题",
  desc = "新消息描述",
} = {}) => {
  const key = `open${Date.now()}`;
  const btn = (
    <Button href="/moduleShop" type="primary" size="small">
      查看
    </Button>
  );
  notification.open({
    message: msg, //"新功能发布！",
    description: desc, //"订单模块已经发布",
    btn,
    key,
    // onClose: this.close,
    duration: 0,
  });
};
// close = () => {
//   console.log(
//     "Notification was closed. Either the close button was clicked or duration time elapsed."
//   );
// };
